using Google.ProtocolBuffers;
using Google.ProtocolBuffers.Collections;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class BatchGetHeadImgRequest : GeneratedMessageLite<BatchGetHeadImgRequest, BatchGetHeadImgRequest.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<BatchGetHeadImgRequest, BatchGetHeadImgRequest.Builder>
		{
			private bool resultIsReadOnly;
			private BatchGetHeadImgRequest result;
			protected override BatchGetHeadImgRequest.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override BatchGetHeadImgRequest MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override BatchGetHeadImgRequest DefaultInstanceForType
			{
				get
				{
					return BatchGetHeadImgRequest.DefaultInstance;
				}
			}
			public BaseRequest BaseRequest
			{
				get
				{
					return this.result.BaseRequest;
				}
				set
				{
					this.SetBaseRequest(value);
				}
			}
			public uint Count
			{
				get
				{
					return this.result.Count;
				}
				set
				{
					this.SetCount(value);
				}
			}
			public IPopsicleList<SKBuiltinString_t> UserNameListList
			{
				get
				{
					return this.PrepareBuilder().userNameList_;
				}
			}
			public int UserNameListCount
			{
				get
				{
					return this.result.UserNameListCount;
				}
			}
			public Builder()
			{
				this.result = BatchGetHeadImgRequest.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(BatchGetHeadImgRequest cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private BatchGetHeadImgRequest PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					BatchGetHeadImgRequest other = this.result;
					this.result = new BatchGetHeadImgRequest();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override BatchGetHeadImgRequest.Builder Clear()
			{
				this.result = BatchGetHeadImgRequest.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override BatchGetHeadImgRequest.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new BatchGetHeadImgRequest.Builder(this.result);
				}
				return new BatchGetHeadImgRequest.Builder().MergeFrom(this.result);
			}
			public override BatchGetHeadImgRequest BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override BatchGetHeadImgRequest.Builder MergeFrom(IMessageLite other)
			{
				if (other is BatchGetHeadImgRequest)
				{
					return this.MergeFrom((BatchGetHeadImgRequest)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override BatchGetHeadImgRequest.Builder MergeFrom(BatchGetHeadImgRequest other)
			{
				return this;
			}
			public override BatchGetHeadImgRequest.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override BatchGetHeadImgRequest.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(BatchGetHeadImgRequest._batchGetHeadImgRequestFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = BatchGetHeadImgRequest._batchGetHeadImgRequestFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 10u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 10u)
						{
							BaseRequest.Builder builder = BaseRequest.CreateBuilder();
							if (this.result.hasBaseRequest)
							{
								builder.MergeFrom(this.BaseRequest);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.BaseRequest = builder.BuildPartial();
							continue;
						}
					}
					else
					{
						if (num3 == 16u)
						{
							this.result.hasCount = input.ReadUInt32(ref this.result.count_);
							continue;
						}
						if (num3 == 26u)
						{
							input.ReadMessageArray<SKBuiltinString_t>(num, text, this.result.userNameList_, SKBuiltinString_t.DefaultInstance, extensionRegistry);
							continue;
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public BatchGetHeadImgRequest.Builder SetBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = value;
				return this;
			}
			public BatchGetHeadImgRequest.Builder SetBaseRequest(BaseRequest.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = builderForValue.Build();
				return this;
			}
			public BatchGetHeadImgRequest.Builder MergeBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBaseRequest && this.result.baseRequest_ != BaseRequest.DefaultInstance)
				{
					this.result.baseRequest_ = BaseRequest.CreateBuilder(this.result.baseRequest_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.baseRequest_ = value;
				}
				this.result.hasBaseRequest = true;
				return this;
			}
			public BatchGetHeadImgRequest.Builder ClearBaseRequest()
			{
				this.PrepareBuilder();
				this.result.hasBaseRequest = false;
				this.result.baseRequest_ = null;
				return this;
			}
			public BatchGetHeadImgRequest.Builder SetCount(uint value)
			{
				this.PrepareBuilder();
				this.result.hasCount = true;
				this.result.count_ = value;
				return this;
			}
			public BatchGetHeadImgRequest.Builder ClearCount()
			{
				this.PrepareBuilder();
				this.result.hasCount = false;
				this.result.count_ = 0u;
				return this;
			}
			public SKBuiltinString_t GetUserNameList(int index)
			{
				return this.result.GetUserNameList(index);
			}
			public BatchGetHeadImgRequest.Builder SetUserNameList(int index, SKBuiltinString_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.userNameList_[index] = value;
				return this;
			}
			public BatchGetHeadImgRequest.Builder SetUserNameList(int index, SKBuiltinString_t.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.userNameList_[index] = builderForValue.Build();
				return this;
			}
			public BatchGetHeadImgRequest.Builder AddUserNameList(SKBuiltinString_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.userNameList_.Add(value);
				return this;
			}
			public BatchGetHeadImgRequest.Builder AddUserNameList(SKBuiltinString_t.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.userNameList_.Add(builderForValue.Build());
				return this;
			}
			public BatchGetHeadImgRequest.Builder AddRangeUserNameList(IEnumerable<SKBuiltinString_t> values)
			{
				this.PrepareBuilder();
				this.result.userNameList_.Add(values);
				return this;
			}
			public BatchGetHeadImgRequest.Builder ClearUserNameList()
			{
				this.PrepareBuilder();
				this.result.userNameList_.Clear();
				return this;
			}
		}
		public const int BaseRequestFieldNumber = 1;
		public const int CountFieldNumber = 2;
		public const int UserNameListFieldNumber = 3;
		private static readonly BatchGetHeadImgRequest defaultInstance;
		private static readonly string[] _batchGetHeadImgRequestFieldNames;
		private static readonly uint[] _batchGetHeadImgRequestFieldTags;
		private bool hasBaseRequest;
		private BaseRequest baseRequest_;
		private bool hasCount;
		private uint count_;
		private PopsicleList<SKBuiltinString_t> userNameList_ = new PopsicleList<SKBuiltinString_t>();
		private int memoizedSerializedSize = -1;
		public static BatchGetHeadImgRequest DefaultInstance
		{
			get
			{
				return BatchGetHeadImgRequest.defaultInstance;
			}
		}
		public override BatchGetHeadImgRequest DefaultInstanceForType
		{
			get
			{
				return BatchGetHeadImgRequest.DefaultInstance;
			}
		}
		protected override BatchGetHeadImgRequest ThisMessage
		{
			get
			{
				return this;
			}
		}
		public BaseRequest BaseRequest
		{
			get
			{
				return this.baseRequest_ ?? BaseRequest.DefaultInstance;
			}
		}
		public uint Count
		{
			get
			{
				return this.count_;
			}
		}
		public IList<SKBuiltinString_t> UserNameListList
		{
			get
			{
				return this.userNameList_;
			}
		}
		public int UserNameListCount
		{
			get
			{
				return this.userNameList_.Count;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasBaseRequest && this.hasCount && this.BaseRequest.IsInitialized;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasBaseRequest)
				{
					num += CodedOutputStream.ComputeMessageSize(1, this.BaseRequest);
				}
				if (this.hasCount)
				{
					num += CodedOutputStream.ComputeUInt32Size(2, this.Count);
				}
				using (IEnumerator<SKBuiltinString_t> enumerator = this.UserNameListList.GetEnumerator())
				{
					while (enumerator.MoveNext())
					{
						SKBuiltinString_t current = enumerator.get_Current();
						num += CodedOutputStream.ComputeMessageSize(3, current);
					}
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private BatchGetHeadImgRequest()
		{
		}
		public SKBuiltinString_t GetUserNameList(int index)
		{
			return this.userNameList_[index];
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] batchGetHeadImgRequestFieldNames = BatchGetHeadImgRequest._batchGetHeadImgRequestFieldNames;
			if (this.hasBaseRequest)
			{
				output.WriteMessage(1, batchGetHeadImgRequestFieldNames[0], this.BaseRequest);
			}
			if (this.hasCount)
			{
				output.WriteUInt32(2, batchGetHeadImgRequestFieldNames[1], this.Count);
			}
			if (this.userNameList_.Count > 0)
			{
				output.WriteMessageArray<SKBuiltinString_t>(3, batchGetHeadImgRequestFieldNames[2], this.userNameList_);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasBaseRequest)
			{
				num ^= this.baseRequest_.GetHashCode();
			}
			if (this.hasCount)
			{
				num ^= this.count_.GetHashCode();
			}
			using (IEnumerator<SKBuiltinString_t> enumerator = this.userNameList_.GetEnumerator())
			{
				while (enumerator.MoveNext())
				{
					SKBuiltinString_t current = enumerator.get_Current();
					num ^= current.GetHashCode();
				}
			}
			return num;
		}
		public override bool Equals(object object_0)
		{
			BatchGetHeadImgRequest batchGetHeadImgRequest = object_0 as BatchGetHeadImgRequest;
			if (batchGetHeadImgRequest == null)
			{
				return false;
			}
			if (this.hasBaseRequest != batchGetHeadImgRequest.hasBaseRequest || (this.hasBaseRequest && !this.baseRequest_.Equals(batchGetHeadImgRequest.baseRequest_)))
			{
				return false;
			}
			if (this.hasCount != batchGetHeadImgRequest.hasCount || (this.hasCount && !this.count_.Equals(batchGetHeadImgRequest.count_)))
			{
				return false;
			}
			if (this.userNameList_.Count != batchGetHeadImgRequest.userNameList_.Count)
			{
				return false;
			}
			for (int i = 0; i < this.userNameList_.Count; i++)
			{
				if (!this.userNameList_[i].Equals(batchGetHeadImgRequest.userNameList_[i]))
				{
					return false;
				}
			}
			return true;
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<BatchGetHeadImgRequest, BatchGetHeadImgRequest.Builder>.PrintField("BaseRequest", this.hasBaseRequest, this.baseRequest_, writer);
			GeneratedMessageLite<BatchGetHeadImgRequest, BatchGetHeadImgRequest.Builder>.PrintField("Count", this.hasCount, this.count_, writer);
			GeneratedMessageLite<BatchGetHeadImgRequest, BatchGetHeadImgRequest.Builder>.PrintField<SKBuiltinString_t>("UserNameList", this.userNameList_, writer);
		}
		public static BatchGetHeadImgRequest ParseFrom(byte[] data)
		{
			return BatchGetHeadImgRequest.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private BatchGetHeadImgRequest MakeReadOnly()
		{
			this.userNameList_.MakeReadOnly();
			return this;
		}
		public static BatchGetHeadImgRequest.Builder CreateBuilder()
		{
			return new BatchGetHeadImgRequest.Builder();
		}
		public override BatchGetHeadImgRequest.Builder ToBuilder()
		{
			return BatchGetHeadImgRequest.CreateBuilder(this);
		}
		public override BatchGetHeadImgRequest.Builder CreateBuilderForType()
		{
			return new BatchGetHeadImgRequest.Builder();
		}
		public static BatchGetHeadImgRequest.Builder CreateBuilder(BatchGetHeadImgRequest prototype)
		{
			return new BatchGetHeadImgRequest.Builder(prototype);
		}
		static BatchGetHeadImgRequest()
		{
			BatchGetHeadImgRequest.defaultInstance = new BatchGetHeadImgRequest().MakeReadOnly();
			BatchGetHeadImgRequest._batchGetHeadImgRequestFieldNames = new string[]
			{
				"BaseRequest",
				"Count",
				"UserNameList"
			};
			BatchGetHeadImgRequest._batchGetHeadImgRequestFieldTags = new uint[]
			{
				10u,
				16u,
				26u
			};
			object.ReferenceEquals(micromsg.Proto.BatchGetHeadImgRequest.Descriptor, null);
		}
	}
}
